package com.zzy.study.charEncoding;

import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;

public class TestCahrEncoding {

	private static final String CODE= "哈";
	
	public static void main(String[] args) throws UnsupportedEncodingException {
		print(CODE.getBytes());
		String csn = Charset.defaultCharset().name();
		System.out.println(csn);
		System.out.println("=======================");
		print(CODE.getBytes("utf-8"));
		System.out.println("=======================");
		print(CODE.getBytes("gbkf"));
	}
	
	private static void print(byte[] objects) {
		for(byte obj : objects) {
			System.out.println(obj);
		}
	}

}
